Skip to content

feat: add day-night cycle - #233

Open
LobatoLobato wants to merge 13 commits into
luisbocanegra:mainfrom
LobatoLobato:day-night-cycle
Open

feat: add day-night cycle#233
LobatoLobato wants to merge 13 commits into
luisbocanegra:mainfrom
LobatoLobato:day-night-cycle

Conversation

@LobatoLobato

Copy link
Copy Markdown

Adds the option to play specific videos during the day/night

Can be activated in Playback config

Videos can be set to day/night/both individually in the Videos tab
Screenshot_20260211_130626

Demo:

DayNightCycleDemo.mp4

Comment thread package/contents/config/main.xml
Comment thread package/contents/ui/main.qml Outdated
Comment thread package/contents/ui/config.qml Outdated
Comment thread package/contents/ui/config.qml Outdated
@luisbocanegra

Copy link
Copy Markdown
Owner

A thing I just noticed is that the Plasma style option is tied to the system color scheme, contrary to how the version of the Image wallpaper which follows the plasma style color.

What should we do here? A) Follow the plasma impl B) Follow the color scheme C) Let the user decide.

IMHO it would be better to follow what plasma does but I am not against having an option to let the user decide.

@LobatoLobato

Copy link
Copy Markdown
Author

A thing I just noticed is that the Plasma style option is tied to the system color scheme, contrary to how the version of the Image wallpaper which follows the plasma style color.

What should we do here? A) Follow the plasma impl B) Follow the color scheme C) Let the user decide.

IMHO it would be better to follow what plasma does but I am not against having an option to let the user decide.

Oh I thought that'd get the same result, I think following the plasma impl is better then. Can't see a reason for the user needing to decide that.

@luisbocanegra

Copy link
Copy Markdown
Owner

A thing I just noticed is that the Plasma style option is tied to the system color scheme, contrary to how the version of the Image wallpaper which follows the plasma style color.
What should we do here? A) Follow the plasma impl B) Follow the color scheme C) Let the user decide.
IMHO it would be better to follow what plasma does but I am not against having an option to let the user decide.

Oh I thought that'd get the same result, I think following the plasma impl is better then. Can't see a reason for the user needing to decide that.

I agree, let me know if you want to work on that.

@LobatoLobato

Copy link
Copy Markdown
Author

A thing I just noticed is that the Plasma style option is tied to the system color scheme, contrary to how the version of the Image wallpaper which follows the plasma style color.
What should we do here? A) Follow the plasma impl B) Follow the color scheme C) Let the user decide.
IMHO it would be better to follow what plasma does but I am not against having an option to let the user decide.

Oh I thought that'd get the same result, I think following the plasma impl is better then. Can't see a reason for the user needing to decide that.

I agree, let me know if you want to work on that.

Yeah I can do that

@XLRC888

XLRC888 commented Mar 20, 2026

Copy link
Copy Markdown

i think i found a bug that no one would ever care about
(in Day/Night Cycle, auto detect location) i tried changing my pcs time to 05:59, it switched the bg to the day video. then I tried changing it to 05:58, but it switched to the night video.
maybe the cycle timer is offset by a minute?

2026-03-20.21-25-19.mp4

@luisbocanegra

luisbocanegra commented Mar 20, 2026

Copy link
Copy Markdown
Owner

I noticed that too, but letting the time pass instead of changing it manually switches the video correctly.

I also noticed that, while this plugin switches the video right away, plasma for example delays the global theme switch according to the transition duration setting when custom times are used, I have not tested if the same applies for automatic location switching but probably does, the same duration is used for night light mode (blue filter) transition.

But the later shouldn't matter much because if someone wants the switch to happen with plasma they can choose based on plasma style option instead

@LobatoLobato

Copy link
Copy Markdown
Author

Sorry for the delay, plasma impl for style detection is done.

Also tested during this period and found almost everything to be fine.
The one problem I found is that now when I change the order of the videos, the wallpaper doesn't change.
It only does if I either change the type of switch or disable the currently playing video, like it is not reacting to the playlist changes.
I looked around and I couldn't find where that would be happening.

Comment thread package/contents/ui/DayNightCycleController.qml Outdated
@luisbocanegra

Copy link
Copy Markdown
Owner

Sorry for the delay, plasma impl for style detection is done.

It works great! Just a small nitpick of an unused import.

Also tested during this period and found almost everything to be fine. The one problem I found is that now when I change the order of the videos, the wallpaper doesn't change. It only does if I either change the type of switch or disable the currently playing video, like it is not reacting to the playlist changes. I looked around and I couldn't find where that would be happening.

I noticed that too, will take a look this weekend.

@LobatoLobato

Copy link
Copy Markdown
Author

It works great! Just a small nitpick of an unused import.

Nice! Removed the import, must've been my editor auto importing when I was trying things heh

I noticed that too, will take a look this weekend.

Okay, I think after that is solved there isn't anything else to do unless some other bug appears, I'll keep testing in the meantime.

@luisbocanegra
luisbocanegra force-pushed the day-night-cycle branch 2 times, most recently from 5940437 to b72cdc5 Compare May 1, 2026 22:50
* Port to ecm_add_qml_module
* Use declarative type registration
* Update URI
* Remove redundant creation DayNight object in settings page
@luisbocanegra

Copy link
Copy Markdown
Owner

Hi, sorry for the silence, updating the configuration should now always work. Along with the day-night cycle. I have also added the possibility to set different videos for sunrise/sunset phases

But I broke the cross-fade 😅, will try to fix it and hopefully release next week if all goes well

@VeryWeirdUser

Copy link
Copy Markdown

(sorry for my not so great english in advance)
Hi, guys!

So, I have an idea that is related to this feature. It would be cool if you had a video and could choose where in the video the sunrise and sunset is, and then stretch the video in a way that the video's sunrise and sunset would be at the same time as in real life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants